﻿{template header}

    {template sidebar}

    <!-- artile begin -->
    <div class="article">

        {template title}


        <form method="post" action="{$this->url($c, 'save', array('id' => $result['id']))}">
        <table>
            <tr>
                <td class="td1" width="25%">商家编号：</td>
                <td class="td2 operate">
                    <input type="text" name="supplierNo" readonly = true placeholder="" class="required" value="{$result['supplierNo'] }"/>

                    <a href="{$this->url('contact','add', array('supplierName' => $result['name']))}">添加联系人</a>
                    <a href="{$this->url('contact', null, array('key' => $result['name']))}">联系人查询</a>
                </td>
            </tr>
            <tr>
                <td class="td1">商家名称：</td>
                <td class="td2">
                    <input type="text" name="name" readonly = true placeholder="" class="required" value="{$result['name']}"  />
                </td>
            </tr>

            <tr>
                <td class="td1">商家地址：</td>
                <td class="td2">
                    <input type="text" name="address" class="input-xlarge" placeholder="请输入供货商地址" value="{$result['address']}" />
                </td>
            </tr>



            <tr>
                <td class="td1">收货地址：</td>
                <td class="td2">
                    <input type="text" class="input-xlarge" name="receiveAddress" placeholder="请输入收货地址" value="{$result['receiveAddress'] }" />
                </td>
            </tr>

             <tr>
                 <th colspan="2" class="td4">
                     <a title="保存供货商" class="btn btn-success save" href="{$this->url($c)}">保 存</a>
                 </th>
             </tr>
         </table>
         </form>
        <script type="text/javascript">
            $( ".supplierNo" ).click( function () {
                var c = $( this ).attr( 'class' );
                $.get( "{$this->url($c, 'get_date')}&format=" + $( this ).attr( 'format' ), function ( result ) {
                    $( 'input[name="' + c + '"]' ).val( result );
                    $( 'input[name="' + c + '"]' ).focus();
                });
                return false;
            });
        </script>

    </div>
<!-- artile end -->
{template footer}